/**
 * 
 * @authors 徐兵 (you@example.org)
 * @date    2018-10-09 09:26:23
 * @version $Id$
 */
var app = {};
var module = {
    init: function () {
        app = new Vue({
            el: '#app',
            data: {

                orderId: "",
                order_info: {},
                shipping_info: [],
                current: {},
                packId: ""
            },
            methods: {
                init: function () {
                    app.orderId = getQueryString("orderId")
                    app.packId = getQueryString("packId")
                    app.messageInfo()
                },
                timeStr1: function (time) {

                    var time4 = time.split(" ")[0];
                    var time1 = time4.split("-")[1] + "-" + time4.split("-")[2]

                    return time1
                },
                timeStr2: function (time) {
                    var time2 = time.split(" ")[1];

                    var time3 = time2.split(":")[0] + ":" + time2.split(":")[1];
                    return time3
                },
                messageInfo: function () {
                    ajaxTemplate(addressUrl + SERVICE.msgInfo, function (data) {

                        if (data.tag == 0) {

                            app.order_info = data.data.result.order_info
                            app.shipping_info = data.data.result.shipping_info;
                            app.current = data.data.result.shipping_info[0].context

                            $(".vue-loading").hide()
                        } else {

                        };
                    }, {

                        orderId: app.orderId,
                        packId: app.packId
                    });
                }


            }

        });
        app.init()


    }
}

module.init()